﻿package bdz.extensions.youtube.events {
	import flash.events.Event;
	
	/**
	 * ...
	 * @author Donald
	 */
	public class YTPlayerEvent extends Event {
		
		public static const STARTED:String = "yt_started";
		public static const PAUSED:String = "yt_paused";
		public static const PLAYING:String = "yt_playing";
		public static const BUFFERING:String = "buffering";
		public static const READY:String = "yt_ready";
		public static const PROGRESS:String = "yt_progress";
		public static const IDLE:String = "yt_idle";
		public static const COMPLETED:String = "yt_completed";
		public static const QUEUED:String = "yt_queued";
		public static const LOADING:String = "yt_loading";
		public var bytesLoaded:Number;
		public var bytesTotal:Number;
		public var startBytes:Number;
		public var duration:Number;
		public var elapsedTime:Number;
		public var totalLoad:Number;
		public var percentPlayed:Number;
		public var alternativePlayer:Boolean = false;
		public function YTPlayerEvent (type:String){
			super(type);
			
		}
		override public function clone():Event {
			var cloned:YTPlayerEvent = new YTPlayerEvent(type);
			for (var prop in this) {
				cloned[prop] = this[prop];
			}
			return cloned;
		}
		public function cloneNewType(type:String):YTPlayerEvent {
			var cloned:YTPlayerEvent = new YTPlayerEvent(type);
			for (var prop in this) {
				cloned[prop] = this[prop];
			}
            return cloned;
        }
		
	}
	
}